﻿
Partial Class _defaultmaster
    Inherits MasterPage


    Protected Sub Page_Init1(sender As Object, e As System.EventArgs) Handles Me.Init
        If Request.Url.AbsoluteUri.Contains("www.") Then
            Response.RedirectPermanent(Request.Url.AbsoluteUri.Replace("www.", ""))
        End If

        plhPhotos.Visible = CSetting.ShowPhotos

        lnkHome.NavigateUrl = CSitemap.Home
        lnkStore1.NavigateUrl = CSitemap.Store
        lnkAbout1.NavigateUrl = CSitemap.About
        lnkSchedule1.NavigateUrl = CSitemap.Schedule
        lnkPhotos.NavigateUrl = CSitemap.Photos
        'lnkSermons1.NavigateUrl = CSitemap.External_Podcast
        'lnkDonations.NavigateUrl = CSitemap.External_Donations

        Dim s As String = Request.Url.AbsolutePath.ToLower
        If s.Contains("youtube.aspx") Then
            lnkPhotos.Font.Underline = True
        ElseIf s.Contains("schedule.aspx") Then
            lnkSchedule1.Font.Underline = True
        ElseIf s.Contains("about.aspx") Then
            lnkAbout1.Font.Underline = True
        ElseIf s.Contains("default.aspx") Then
            lnkHome.Font.Underline = True
        Else
            lnkStore1.Font.Underline = True
        End If
    End Sub

End Class

